body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
dl, dt, dd, ul, ol, li,
pre,
fieldset, lengend, button, input, textarea,
th, td {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

body,
button, input, select, textarea {
  font: 14px/1 tahoma, arial, 'Hiragino Sans GB', '\5FAE\8F6F\96C5\9ED1', sans-serif;
}

address, cite, dfn, em, var, i {
  font-style: normal;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
}

q:before, q:after {
  content: '';
}

fieldset, img, input {
  border: none;
}

button, input, select, textarea {
  font-size: 100%;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

input {
  outline: none;
}

input:focus {
  outline: none;
}

a, img, div, span, i, section {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  height: 100%;
}

body {
  height: 100%;
}

.show {
  display: block !important;
}

.hide {
  display: none !important;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: transparent;
}

.tool-bar {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: 1px solid #ddd;
  flex-wrap: wrap;
  padding-top: 40px;
}

.tool-bar .iconfont {
  width: 25%;
  text-align: center;
  padding: 15px;
  padding-top: 30px;
  padding-bottom: 10px;
  box-sizing: border-box;
  position: relative;
}

.tool-bar .iconfont:after {
  content: '';
  position: absolute;
  height: 100%;
  width: 1px;
  background-color: #ddd;
  top: 0;
  right: 0;
  -webkit-transform: scaleX(0.5);
      -ms-transform: scaleX(0.5);
          transform: scaleX(0.5);
}

.tool-bar:last-child:after {
  display: none;
}

.icon-palette {
  position: absolute;
  bottom: 24px;
  right: 20px;
  font-size: 30px;
  line-height: 30px;
}

.icon-cancel {
  font-size: 25px;
  line-height: 25px;
  position: absolute;
  bottom: 25px;
  right: 20%;
}

.icon-demo {
  font-size: 25px;
  line-height: 25px;
  position: absolute;
  bottom: 24px;
  right: 36%;
}

.icon-eraser {
  font-size: 25px;
  line-height: 25px;
  position: absolute;
  bottom: 25px;
    right: -20%;
}

.icon-clear {
  font-size: 25px;
  line-height: 25px;
  position: absolute;
  bottom: 25px;
  right: -25%;
}

.palette {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 70px;
  width: 0;
  transition: width .5s ease-in-out;
  padding: 0 60px 0 0px;
  box-sizing: border-box;
  z-index: 2
}

.palette .bar {
  width: 80%;
  margin-left: 20%;
  height: 50px;
  padding: 5px 2px;
  border-radius: 5px;
  -webkit-animation: show-left .5s ease-in-out;
          animation: show-left .5s ease-in-out;
  overflow: auto;
  background-color: #fff;
  border: 1px solid #fff;
}
.palette .name{
  position: absolute;
  bottom: -2px;
  right: 10px;
  font-size: 16px;
  /*font-weight: bold;*/
  line-height: 30px;
  width: 40px;
  display: inline-block;
  margin-left: -5px;
}

.palette .scroll {
  *zoom: 1;
  width: 1000px;
}

.palette .scroll:after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: '';
  clear: both;
  height: 0;
}

.palette .item {
  float: left;
  width: 40px;
  height: 40px;
  border: 1px solid #eee;
  margin: 0 2px;
  border-radius: 4px;
}

.palette-show {
  width: 100%;
}

.palette-show .bar {
  border: 1px solid #dfdfdf;
}

@-webkit-keyframes show-left {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes show-left {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.red {
  background-color: #f44336;
}

.pink {
  background-color: #e91e63;
}

.purple {
  background-color: #9c27b0;
}

.deep-purple {
  background-color: #673ab7;
}

.indigo {
  background-color: #3f51b5;
}

.blue {
  background-color: #2196f3;
}

.light-blue {
  background-color: #03a9f4;
}

.cyan {
  background-color: #00bcd4;
}

.teal {
  background-color: #009688;
}

.green {
  background-color: #4caf50;
}

.light-green {
  background-color: #8bc34a;
}

.lime {
  background-color: #cddc39;
}

.yellow {
  background-color: #ffeb3b;
}

.amber {
  background-color: #ffc107;
}

.orange {
  background-color: #ff9800;
}

.deep-orange {
  background-color: #ff5722;
}

.brown {
  background-color: #795548;
}

.grey {
  background-color: #9e9e9e;
}

.blue-grey {
  background-color: #607d8b;
}

.black {
  background-color: #000;
}

.width {
  position: absolute;
  bottom: 0px;
  left: 0;
  height: 70px;
  width: 0;
  transition: width .5s ease-in-out;
  padding: 0 20px 0 50px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 2
}

.width .icon-width {
  position: absolute;
  bottom: 24px;
  left: 10px;
  font-size: 30px;
  line-height: 30px;
}
.width .name{
  position: absolute;
  bottom: -2px;
  left: 10px;
  font-size: 16px;
  line-height: 30px;
  width: 40px;
  display: inline-block;
  text-align: center;
}

.width .bar {
  width: 100%;
  height: 30px;
  border-radius: 5px;
  -webkit-animation: show-left .5s ease-in-out;
          animation: show-left .5s ease-in-out;
  overflow: auto;
  background-color: #fff;
  border: 1px solid #fff;
  margin-top: 14px;
}

.width .range {
  width: 90%;
  font-size: 14px;
  font-weight: bold;
  height: 20px;
  display: block;
  margin: 5px auto;
}

.width-show {
  width: 100%;
}

.width-show .bar {
  border: 1px solid #dfdfdf;
}

.demo-bar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  -webkit-animation: slide-left .5s ease-in-out;
          animation: slide-left .5s ease-in-out;
  display: none;
}

.demo-bar .main-bar {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  overflow: auto;
}

.demo-bar .img {
  display: block;
  width: 100%;
}

.demo-bar .close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 40px;
}

@-webkit-keyframes slide-left {
  0% {
    -webkit-transform: translateX(-100%);
            transform: translateX(-100%);
  }
  100% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
}

@keyframes slide-left {
  0% {
    -webkit-transform: translateX(-100%);
            transform: translateX(-100%);
  }
  100% {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
}

#canvas2{
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1
}

/*画板*/
#toPalette{
  background-image: url(images/theme.png);
  background-size: 100% 100%;
  width: 40px;
  height: 40px;
}
/*线条粗细*/
#toWidth{
  background-image: url(images/add.png);
  background-size: 100% 100%;
  width: 40px;
  height: 40px;
}
/*撤回*/
#cancel{
  background-image: url(images/back.png);
  background-size: 100% 100%;
  width: 40px;
  height: 40px;
  z-index: 1;
}
#cancel::after{
  content: '撤销';
  width: 40px;
  height: 40px;
  font-size: 16px;
  position: absolute;
  top: 100%;
  text-align: center;
}
/*下载图片*/
#saveImg{
  background-image: url(images/download.png);
  background-size: 100% 100%;
  width: 40px;
  height: 40px;
}
#saveImg::after{
  content: '保存';
  width: 40px;
  height: 40px;
  font-size: 16px;
  position: absolute;
  top: 100%;
  text-align: center;
}

/*橡皮*/
#eraser{
  background-image: url(images/eraser.png);
  background-size: 100% 100%;
  width: 40px;
  height: 40px;
}
#eraser::after{
  content: '橡皮';
  width: 40px;
  height: 40px;
  font-size: 16px;
  position: absolute;
  top: 100%;
  text-align: center;
  transform:none;
  background-color: transparent;
}
/*清空*/
#clr{
  background-image: url(images/clear.png);
  background-size: 100% 100%;
  width: 40px;
  height: 40px;
}
#clr::after{
  content: '清空';
  width: 40px;
  height: 40px;
  font-size: 16px;
  position: absolute;
  top: 100%;
  text-align: center;
  transform:none;
  background-color: transparent;
}